'use strict';

module.exports = app => {
    const { INTEGER, STRING, DATE, BIGINT, BOOLEAN, DECIMAL } = app.Sequelize;

    const Price = app.model.define('price', {
        id: { type: BIGINT, primaryKey: true, autoIncrement: true },
        cost_price: DECIMAL(10, 2),
        current_price: DECIMAL(10, 2),
        total_amount: DECIMAL(10, 2),
        count: INTEGER,
        type: INTEGER,
        index: INTEGER,
        create_time: DATE,
        update_time: DATE,
        delete_time: DATE
    });


    return Price;
}